CC := gcc

IDIR := ../include

CFLAGS := -Wall -I$(IDIR)
LFLAGS := -lrt -lpthread
OUT := bin/opp

all: setup obj/main.o
	$(CC) obj/main.o ../bin/libopp.a -o $(OUT) $(LFLAGS)

setup:
	@mkdir -pv obj bin

obj/main.o: src/main.c src/main.h
	$(CC) -c $< -o $@ $(CFLAGS) 

clean:
	@rm -f obj/*.o
	@rm -f $(OUT)
